home *** CD-ROM | disk | FTP | other *** search
- class PowerUpItems extends MovieClip
- {
- var available_to_hit;
- var interval_id;
- var POWER_ITEM_TIMER = 10;
- function PowerUpItems()
- {
- super();
- this.available_to_hit = true;
- }
- function onEnterFrame()
- {
- if(this.hitTest(_global.Rescuer) && this.available_to_hit && !_global.Rescuer.currentPowerItem)
- {
- _global.Rescuer.currentPowerItem = this._name;
- _global.Rescuer[this._name].gotoAndPlay("go");
- this.activate();
- }
- }
- function activate()
- {
- }
- function addToScore(count)
- {
- _global.Footer.addScore(count);
- }
- function stickToRescuer()
- {
- _global.Rescuer[this._name]._visible = true;
- }
- function killPowerUp()
- {
- this.killCustom();
- _global.Rescuer[this._name].gotoAndStop("stop");
- _global.Rescuer.currentPowerItem = undefined;
- _global.Rescuer[this._name]._visible = false;
- clearInterval(this.interval_id);
- this.enabled = false;
- this.removeMovieClip();
- }
- function killCustom()
- {
- }
- }
-